package main

import (
	"fmt"
	"os"
	"strings"
)

func vals() (int, int) {
	return 3, 7
}

func sum(nums ...int) {
	fmt.Print(nums, " ")
	total := 0
	for _, num := range nums {
		total += num
	}
	fmt.Println(total)
}


type person struct {
	 name string
	 age int
}


func (p *person) getAge() int{
	return p.age
}

type ii interface {
	age()
}
func main() {
	//s, sep := "", ""
	//for _, arg := range os.Args[0:] {
	//	s += sep + arg
	//	sep = " "
	//}
	//fmt.Println(s)

	fmt.Println(strings.Join(os.Args[1:], " "))

	i := 1
	fmt.Println("go" + string(i))

	if num := 0; num < 0 {
		fmt.Println(num, "is negative")
	} else if a := "222"; a == "222" && num > 0 {
		fmt.Println("is positive")
	} else {
		fmt.Println(a)
	}

	whatAmI := func(i interface{}) {
		switch t := i.(type) {
		case bool:
			fmt.Println("I'm a bool")
		case int:
			fmt.Println("I'm an int", i)
		default:
			fmt.Printf("Don't know type %T\n", t)
		}
	}
	whatAmI(true)
	whatAmI(1)
	whatAmI("hey")

	aa := [5]int{1,2,3,4,5}

	m := make(map[string]interface{})
	m["2"] = "@222"
	delete(m, "2")

	_, exist := m["@"]

	sum(1,2,3)
	sum(aa[:]...)
}
